package net.cloudcodex.client.character.view;

import net.cloudcodex.client.campaign.view.CampaignsView;
import net.cloudcodex.client.campaign.view.CampaignsView.Message;
import net.cloudcodex.client.character.view.panel.CharacterInCampaignPanel;

import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.inject.Inject;

public class CharacterInCampaignViewImpl extends SimplePanel implements
		CharacterInCampaignView {
	
	CharacterInCampaignPanel characterInCampaignPanel = new CharacterInCampaignPanel();
	
	
	@Inject
	public CharacterInCampaignViewImpl(Message message) {
		characterInCampaignPanel.setMessage(message);
		this.add(characterInCampaignPanel);
		
		
	}
	
	
	@Override
	public void addCharacter(long id, String name, String icon, boolean isActiveCharacter){
		characterInCampaignPanel.addCharacter(id, name, icon, isActiveCharacter);
	}
	
	@Override
	public HasClickHandlers getCharacterAvatar(){
		return characterInCampaignPanel.getCharacterAvatar();
	}
}
